<!DOCTYPE html>
<html lang="en">
<head>
<title>WebView4Delphi: uWVTypeLibrary: Interface ICoreWebView2ScriptException</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="ICoreWebView2ScriptException"></span><h1 class="cio">Interface ICoreWebView2ScriptException</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uWVTypeLibrary.html">uWVTypeLibrary</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type ICoreWebView2ScriptException = interface(IUnknown)</code></p>
<h2 class="description">Description</h2>
<p>
 This interface represents a JavaScript exception. If the CoreWebView2.ExecuteScriptWithResult result has Succeeded as false, you can use the result's Exception property to get the script exception. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2scriptexception">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2scriptexception</a>&quot;&gt;See the ICoreWebView2ScriptException article.)</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">IUnknown</li>
<li class="thisitem">ICoreWebView2ScriptException</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2ScriptException.html#Get_LineNumber-SYSUINT-">Get_LineNumber</a></strong>(out value: SYSUINT): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2ScriptException.html#Get_ColumnNumber-SYSUINT-">Get_ColumnNumber</a></strong>(out value: SYSUINT): HResult; stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2ScriptException.html#Get_name-PWideChar-">Get_name</a></strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2ScriptException.html#Get_Message-PWideChar-">Get_Message</a></strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2ScriptException.html#Get_ToJson-PWideChar-">Get_ToJson</a></strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_LineNumber-SYSUINT-"></span><code>function <strong>Get_LineNumber</strong>(out value: SYSUINT): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The line number of the source where the exception occurred. In the JSON it is `exceptionDetail.lineNumber`. Note that this position starts at 0. </p>
<h6 class="description_section">Attributes</h6>
<dl class="attributes">
  <dt>GUID['{054DAE00-84A3-49FF-BC17-4012A90BC9FD}']</dt>
  <dd></dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_ColumnNumber-SYSUINT-"></span><code>function <strong>Get_ColumnNumber</strong>(out value: SYSUINT): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The column number of the source where the exception occurred. In the JSON it is `exceptionDetail.columnNumber`. Note that this position starts at 0. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_name-PWideChar-"></span><code>function <strong>Get_name</strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The Name is the exception's class name. In the JSON it is `exceptionDetail.exception.className`. This is the empty string if the exception doesn't have a class name. This can happen if the script throws a non-Error object such as `throw &quot;abc&quot;;` </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_Message-PWideChar-"></span><code>function <strong>Get_Message</strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The Message is the exception's message and potentially stack. In the JSON it is exceptionDetail.exception.description. This is the empty string if the exception doesn't have a description. This can happen if the script throws a non-Error object such as throw &quot;abc&quot;;. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Get_ToJson-PWideChar-"></span><code>function <strong>Get_ToJson</strong>(out value: PWideChar): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 This will return all details of the exception as a JSON string. In the case that script has thrown a non-Error object such as `throw &quot;abc&quot;;` or any other non-Error object, you can get object specific properties. </p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
